//
//  CYTabBarViewController.h
//  CYTabBarViewController
//
//  Created by lc4y on 2017/12/2.
//  Copyright © 2017年 weiwang. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "CYTabBarHeader.h"

@class CYTitleView;

@interface CYTabBarItem : NSObject

/** 标题 **/
@property(nonatomic,copy) NSString *cy_titleN;

/** 正常图片 **/
@property(nonatomic,copy) NSString *cy_normalImageN;

/** 选中图片 **/
@property(nonatomic,copy) NSString *cy_selectedImageN;

@end

@interface CYTabBarViewController : UIViewController

@property (nonatomic, strong, readonly) CYTitleView *titleView;

/** 保存所有的子视图控制器 **/
@property(nonatomic,strong) NSArray *cy_viewControllers;

/** 选中的当前视图 **/
@property(nonatomic,assign) NSInteger cy_selectedIndex;

- (instancetype)initWithTopStyle:(CYTopTitleViewStyle)style;

/** 显示当前视图 **/
- (void)cy_showInViewController:(UIViewController *)viewController;

/** 销毁视图 **/
- (void)cy_freeSubViewController;

@end

@interface UIViewController (CYTabBarItem)

/** 为CYTabBarViewController的显示 **/
@property(nonatomic,strong) CYTabBarItem *cy_tabBarItem;

// 方便viewController获取当前 cy_tabBarController
@property(nonatomic,strong) CYTabBarViewController *cy_tabBarController;

@end
